package net.lainiao.morethread.Chapter2.demo6;


/**
 * Created by Administrator on 2017/2/28.
 */
public class Job implements Runnable {
    private  PrintQueue printQueue;

    public Job(PrintQueue printQueue) {
        this.printQueue = printQueue;
    }

    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName()+" Going to print a document");
        printQueue.printJob(new Object());
        System.out.println("The DocumentMock has been printed "+Thread.currentThread().getName());
    }
}
